<?php
require_once "interface/Gi_Paginator_Adapter_Interface.php";   
Class Gi_Paginator_Array implements Gi_Paginator_Adapter_Interface {
  protected $_array = null;   
  
  protected $_count = null;   
  
  public function __construct (array $array) {
    $this->_array = $array;
    $this->_count = count($array);
  }
  
  public function get_items ($offset, $item_per_page) {
    return array_slice($this->_array, $offset, $item_per_page);
  }

  public function count() {
    return $this->_count;
  }
}
?>
